home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / eiffel / smalleif.97 / se.t / SmallEiffel / misc / basic_test next >
Encoding:
Text File  |  1996-05-02  |  2.7 KB  |  112 lines

  1. #!/bin/csh
  2. # Some Basic Tests including Kernel Classes
  3. #
  4. # Usage : basic_test [args_for_compile]
  5. #
  6. #set verbose = 1
  7. if (!($?SmallEiffel)) then
  8.     echo "Environment Variable 'SmallEiffel' not set."
  9.     exit 1
  10. endif
  11. set compile=${SmallEiffel}/bin/compile
  12. echo Testing ${compile} $* > /dev/tty
  13. echo Options : $*
  14. ###################################################################
  15. /bin/rm -f ./a.out
  16. ${compile} $* HELLO_WORLD make > /dev/null
  17. ./a.out
  18. ###################################################################
  19. cd ${SmallEiffel}/lib_test
  20. echo -n "Testing ."
  21. foreach t (vide.e test_*.e)
  22.     ${compile} $* $t make > /dev/null
  23.     if (${status}) then
  24.         echo Error While Compiling ${t}
  25.     else
  26.         echo -n "."
  27.     endif
  28.     if (!(-x ./a.out)) then
  29.         echo No a.out for file ${t}
  30.     else
  31.         echo -n "."
  32.     endif
  33.     ./a.out
  34.     if (${status}) then
  35.         echo Error While Running ${t}
  36.     else
  37.         echo -n "."
  38.         /bin/rm -f ./a.out
  39.     endif
  40. end
  41. cd ${SmallEiffel}/bin
  42. ###################################################################
  43. /bin/rm -f ./a.out
  44. ${compile} -boost BOOST_IS_STATIC make > /dev/null
  45. echo -n "."
  46. ./a.out
  47. echo -n "."
  48. ###################################################################
  49. /bin/rm -f ./a.out
  50. ${compile} $* TEST_ARGUMENTS make > /dev/null
  51. ./a.out
  52. echo -n "."
  53. ./a.out 1
  54. echo -n "."
  55. ./a.out 2 arg2
  56. echo "."
  57. ###################################################################
  58. /bin/rm -f ./a.out
  59. echo "TRY_ANIMAL"
  60. ${compile} $* TRY_ANIMAL make > /dev/null
  61. ./a.out
  62. ###################################################################
  63. /bin/rm -f ./a.out
  64. echo "TRY_PRINT_ON"
  65. ${compile} $* TRY_PRINT_ON make > /dev/null
  66. ./a.out
  67. ###################################################################
  68. echo "Compiling SmallEiffel/lib_show"
  69. cd ${SmallEiffel}/bin
  70. ${compile} $* PYRAMID make > /dev/null
  71. echo -n "."
  72. ${compile} $* PYRAMID2 make > /dev/null
  73. echo -n "."
  74. ${compile} $* SPREAD_ILLNESS make > /dev/null
  75. echo -n "."
  76. /bin/rm -f ./a.out
  77. ################################
  78. cd ${SmallEiffel}/lib_show/parking
  79. ${compile} $* RUN_PARKING make > /dev/null
  80. /bin/rm -f a.out
  81. echo -n "."
  82. ################################
  83. cd ${SmallEiffel}/lib_show/gcd
  84. ${compile} $* TEST_GCD make > /dev/null
  85. echo -n "."
  86. ./a.out
  87. /bin/rm -f ./a.out
  88. echo -n "."
  89. ###################################################################
  90. cd ${SmallEiffel}/lib_show/external
  91. ${compile} $* EXTERNAL_DEMO make src.c > /dev/null
  92. ./a.out >! tmp$$
  93. if ($status) then
  94.    echo "Error in lib_show/external."
  95.    exit 1
  96. endif
  97. /bin/rm -f tmp* src.o ./a.out
  98. echo -n "."
  99. ###################################################################
  100. cd ${SmallEiffel}/lib_show/bench1
  101. foreach b (*_bench1.e)
  102.     ${compile} $* $b make > /dev/null
  103.     ./a.out > /dev/null
  104.     if ($status) then
  105.        echo "Error in lib_show/${b}.e"
  106.        exit 1
  107.     endif
  108.     echo -n "."
  109. end
  110. echo " Done."
  111.  
  112.